package com.iqunxing.redis.redisInAction.ch08.po;

import java.util.Date;

import org.apache.commons.lang3.builder.ToStringBuilder;

public class UserMessage {

    private Long id;

    private Long userId;

    private String loginName;

    private String message;

    private Date postTime;

    public UserMessage() {

    }

    public UserMessage(Long id, Long userId, String loginName, String message) {
        this.id = id;
        this.userId = userId;
        this.loginName = loginName;
        this.message = message;
        this.postTime = new Date();
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Long getUserId() {
        return userId;
    }

    public void setUserId(Long userId) {
        this.userId = userId;
    }

    public String getLoginName() {
        return loginName;
    }

    public void setLoginName(String loginName) {
        this.loginName = loginName;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public Date getPostTime() {
        return postTime;
    }

    public void setPostTime(Date postTime) {
        this.postTime = postTime;
    }

    @Override
    public String toString() {
        return ToStringBuilder.reflectionToString(this);
    }

}
